package com.yinlei.appserver

import java.net.Socket

class HttpContext {
    private lateinit var underlySocket: Socket
    private val requestHeaders = HashMap<String, String>()

    fun setUnderlySocket(socket: Socket) {
        this.underlySocket = socket
    }

    fun getUnderlySocket() : Socket {
        return this.underlySocket
    }

    fun addRequestHeader(headerName: String, headerValue: String) {
        requestHeaders[headerName] = headerValue
    }

    fun getRequestHeaderValue(headerName: String) = requestHeaders[headerName]

}